/*
 * FilePath     : \src\main.ts
 * Author       : 苏军志
 * Date         : 2023-06-04 08:42
 * LastEditors  : 苏军志
 * LastEditTime : 2025-03-12 17:12
 * Description  :
 * CodeIterationRecord:
 */
import "@/utils/Date.js";
import directives from "@/utils/directives"; // 自定义指令
import "@/utils/flexble.js"; // 自适应
import navigation from "@/utils/navigation"; // 导航卫士
import "@/utils/setting.ts";
import "@imengyu/vue3-context-menu/lib/vue3-context-menu.css";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import ElTableInfiniteScroll from "el-table-infinite-scroll";
import elementPlus, { ElDialog, ElDrawer } from "element-plus";
import "element-plus/dist/index.css";
import locale from "element-plus/dist/locale/zh-cn.js";
import { createApp } from "vue";
import app from "./App.vue";
import router from "./router"; // 路由
dayjs.locale("zh-cn");

// 设置页面跳转规则
navigation.set(router);
// 初始化配置
initSetting();
// 创建实例
const appInstance = createApp(app);
appInstance
  .use(directives)
  .use(router)
  .use(elementPlus, { size: "small", zIndex: 3000, locale })
  .use(ElTableInfiniteScroll as any)
  .mount("#app");

// 设置全局属性 弹窗默认点击遮罩层不关闭
ElDrawer.props.closeOnClickModal.default = false;
ElDialog.props.closeOnClickModal.default = false;
